package cn.shuangliang.contract.service;

import cn.shuangliang.contract.dao.AdminMapper;
import cn.shuangliang.contract.model.Admin;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author oldliu
 * @since 1.0
 */
@Service
public class AdminService {

    //默认按照类型
    @Resource
    //@Autowired
    private  AdminMapper mapper;

    public Admin login(String u, String p){

            return mapper.login(u,p);

    }

    public int resetPass(Long id, String newPass, String oldPass) {
            return mapper.resetPass(id,newPass,oldPass);
    }
}
